package com.lianzhihui.romeex.adapter;

import android.content.Context;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lianzhihui.romeex.R;
import com.lianzhihui.romeex.bean.EcologicalLisrBean;

import java.util.List;

/**
 * @ProjectName: romeex
 * @Package: com.lianzhihui.romeex.adapter
 * @ClassName: MessageActivityAdapter
 * @Description: java类作用描述
 * @Author: zhanghong
 * @CreateDate: 2020/11/2 15:02
 * @UpdateUser: 更新者：
 * @UpdateDate: 2020/11/2 15:02
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class EcologicalFragmentAdapter extends BaseQuickAdapter<EcologicalLisrBean, BaseViewHolder> {
    private Context context;

    public EcologicalFragmentAdapter(Context context, @Nullable List<EcologicalLisrBean> data) {
        super(R.layout.item_ecological, data);
        this.context = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, EcologicalLisrBean item) {
        helper.setText(R.id.message_title, item.getTitle())
                .setImageResource(R.id.icon, item.getRes())
                .setText(R.id.message_content, item.getMessage());
    }
}
